package cn.tedu.submarine;

import javax.swing.*;

//深水炸弹类
public class Bomb extends SeaObject{

    /**构造方法*/
    public Bomb(int x,int y){
        super(9,12,x,y,3);
    }

    /*
    public  void step1(){
        y+=speed;
        x+=speed;
    }
    public  void step2(){
        y+=speed;
        x-=speed;
    }

     */
    public void step(){
        y+=speed;
    }
    public void a(){
        y+=speed;
        x-=speed;
    }
    public void b(){
        y+=speed;
        x+=speed;
    }


    public ImageIcon getImage(){
        if(isLive()){
            return Images.bomb;
        }else{
            return null;
        }
    }


    public Boolean isOutOfBounds() {
        return this.y>=World.HEIGHT;
    }
}
